<?php

namespace App\Controller\Wap;

use App\Entity\Orders;
use App\Model\BannersModel;
use App\Model\MoneyExModel;
use App\Model\OrdersModel;
use App\Model\ShopGoodsModel;
use App\Model\UserLikesProductModel;
use App\Setting\BannersSetting;
use App\Base\BaseConfig;
use App\Base\BaseController4User;
use App\Model\LazyCommon\CCM;
use App\Model\LazyCommon\PlatConfigModel;
use Model\UserBundle\Entity\User;
use App\Model\LazyCommon\UserLoginLogModel;
use App\Model\LazyCommon\UserModel;
use App\Model\LazyCommon\UserInviteExModel;
use App\Model\LazyCommon\WechatModel;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\Request;


/**
 * @route("/wap")
 */
class PageController extends BaseController4User
{

    /**
     * @route("/show/page",name="UserAppShowPage")
     */
    public function UserAppUserLevelUp(Request $request)
    {
        if(!$pid = $this->getParamRequired("pid")){return $this->json_out(0,"");}
        $PlatConfigModel = new PlatConfigModel($this->getDoctrine());
        $PlatConfig = $PlatConfigModel->get($pid);
        $html = $PlatConfig->getArticle();
        $title = $PlatConfig->getTips();
        $this->data["title"] = $title;
        $this->data["content"] = $html;

        return $this->render("App/Wap/page.php.twig",$this->data);
    }
}
